CREATE TABLE `SRTheo`.`MsgTheoSurfacePerf` (
`ekey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ekey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ekey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`ekey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`ekey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`ekey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`theoModel` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'theo model',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'client firm this theo model is associated with (controls visibility)',
`perfSurfType` ENUM('None','Live','PriorDay') NOT NULL DEFAULT 'None',
`date` VARCHAR(10) NOT NULL DEFAULT '',
`time` VARCHAR(8) NOT NULL DEFAULT '',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock underlier stock key',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock underlier stock key',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'SpiderRock underlier stock key',
`strike` FLOAT NOT NULL DEFAULT 0 COMMENT 'atm strike (fwd uPrc);from LiveSurfacePerf record',
`tEMove` FLOAT NOT NULL DEFAULT 0 COMMENT 'theoretical event move (if any)',
`cTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo call volatility (from theoModel @ strike = strike)',
`pTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo put volatility (from theoModel @ strike = strike)',
`cTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo call price @ (cTVol, uMark, years, sdiv, rate, ddiv)',
`pTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo put price @ (pTVol, uMark, years, sdiv, rate, ddiv)',
`fixCTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'fixed strike theo call volatility (from theoModel @ strike = prvStrike)',
`fixPTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'fixed strike theo put volatility (from theoModel @ strike = prvStrike)',
`fixCTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'fixed strike theo call price @ (fixTVol, uMark, years, sdiv, rate, ddiv);strike = prvStrike',
`fixPTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'fixed strike theo put price @ (fixTVol, uMark, years, sdiv, rate, ddiv);strike = prvStrike',
`prvStrike` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period atm strike',
`prvTEMove` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theoretical event move (if any)',
`prvCTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo call volatility @ strike = prvStrike',
`prvPTVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo put volatility @ strike = prvStrike',
`prvCTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo call price @ strike = prvStrike',
`prvPTOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo call price @ strike = prvStrike',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ekey_tk`,`ekey_yr`,`ekey_mn`,`ekey_dy`,`ekey_at`,`ekey_ts`,`theoModel`,`clientFirm`,`perfSurfType`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='TheoSurfacePerf records are published throughout he day for each active client theoretical model in the SpiderRock system. They are suitable for tracking performance of a theoretical model surface whether or not it is being traded.\nTheoSurfacePerf records are published to the SpiderRock elastic cluster at the end of each day.';